<template>
	<view class="">
		<input class="ipt" type="text" placeholder="请输入" v-model="iptValue.name" name="" id="">
	</view>
</template>

<script lang="ts" setup>
import { ref, watch,reactive } from 'vue';

	const iptValue = reactive({
		name:'张三',
		age:'23'
	})

	
	// watch(iptValue,(newValue,oldValue)=>{
	// 	console.log( oldValue,newValue);
	// },{deep:true})
	watch(()=>iptValue.name,(newValue,oldValue)=>{
		console.log( oldValue,newValue);
	})
</script>                       
 
<style scoped lang="scss">
.ipt{
	height: 30px;
	background-color: #ccc;
	margin: 0 20px;
}
</style>
